<?php
$ma_lop=$_GET['ma_lop'];
include('../../configs/connect.php');   
mysql_query("SET NAMES 'UTF8'");
            
    $sql="  SELECT tbl_nhaphoc.ma_sv,hoten_sv,gioitinh_sv,ngaysinh_sv,tbl_sv_lop.ma_svlop
            FROM    tbl_sv_lop,tbl_sinhvien,tbl_nhaphoc
            WHERE  tbl_sinhvien.ma_sv=tbl_nhaphoc.ma_sv 
            AND    tbl_sv_lop.ma_nhaphoc=tbl_nhaphoc.ma_nhaphoc 
            AND    tbl_sv_lop.ma_lop ='$ma_lop'";
    $result = mysql_query($sql) or die(mysql_error());
    
 echo "<table class='danhsach'  id='ds'>";
 echo "<tr id='a'>
            <th class='td-54'>STT</th>
            <th class='td-94'>Mã SV</th>
            <th class='td-130'>Họ tên</th>
            <th class='td-42'>GT</th>
            <th class='td-79'>Ngày sinh</th>
        </tr>";
    $i=0;
    while($row = mysql_fetch_array($result))
        {
            $i+=1;
            echo "<tr>";
                echo "<td>".$i."<input type='checkbox' value=".$row['4']." class='sv-item'/></td>";
                echo "<td>" . $row['0'] . "</td>";
                echo "<td>" . $row['1'] . "</td>";
                echo "<td>" . $row['2'] . "</td>";
                echo "<td>" . $row['3'] . "</td>";
            echo "</tr>";       
        }
echo "</table>"; 
?>